<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 2006-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Runtime Library Routines (GNU libgomp)</title>

<meta name="description" content="Runtime Library Routines (GNU libgomp)">
<meta name="keywords" content="Runtime Library Routines (GNU libgomp)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Library-Index.html" rel="index" title="Library Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="Environment-Variables.html" rel="next" title="Environment Variables">
<link href="OpenMP-Implementation-Status.html" rel="prev" title="OpenMP Implementation Status">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en">
<div class="chapter-level-extent" id="Runtime-Library-Routines">
<div class="nav-panel">
<p>
Next: <a href="Environment-Variables.html" accesskey="n" rel="next">OpenMP Environment Variables</a>, Previous: <a href="OpenMP-Implementation-Status.html" accesskey="p" rel="prev">OpenMP Implementation Status</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="OpenMP-Runtime-Library-Routines"><span>3 OpenMP Runtime Library Routines<a class="copiable-link" href="#OpenMP-Runtime-Library-Routines"> &para;</a></span></h2>

<p>The runtime routines described here are defined by Section 3 of the OpenMP
specification in version 4.5.  The routines are structured in following
three parts:
</p>



<ul class="mini-toc">
<li><a href="omp_005fget_005factive_005flevel.html" accesskey="1"><code class="code">omp_get_active_level</code> &ndash; Number of parallel regions</a></li>
<li><a href="omp_005fget_005fancestor_005fthread_005fnum.html" accesskey="2"><code class="code">omp_get_ancestor_thread_num</code> &ndash; Ancestor thread ID</a></li>
<li><a href="omp_005fget_005fcancellation.html" accesskey="3"><code class="code">omp_get_cancellation</code> &ndash; Whether cancellation support is enabled</a></li>
<li><a href="omp_005fget_005fdefault_005fdevice.html" accesskey="4"><code class="code">omp_get_default_device</code> &ndash; Get the default device for target regions</a></li>
<li><a href="omp_005fget_005fdevice_005fnum.html" accesskey="5"><code class="code">omp_get_device_num</code> &ndash; Return device number of current device</a></li>
<li><a href="omp_005fget_005fdynamic.html" accesskey="6"><code class="code">omp_get_dynamic</code> &ndash; Dynamic teams setting</a></li>
<li><a href="omp_005fget_005finitial_005fdevice.html" accesskey="7"><code class="code">omp_get_initial_device</code> &ndash; Return device number of initial device</a></li>
<li><a href="omp_005fget_005flevel.html" accesskey="8"><code class="code">omp_get_level</code> &ndash; Obtain the current nesting level</a></li>
<li><a href="omp_005fget_005fmax_005factive_005flevels.html" accesskey="9"><code class="code">omp_get_max_active_levels</code> &ndash; Current maximum number of active regions</a></li>
<li><a href="omp_005fget_005fmax_005ftask_005fpriority.html"><code class="code">omp_get_max_task_priority</code> &ndash; Maximum priority value</a></li>
<li><a href="omp_005fget_005fmax_005fteams.html"><code class="code">omp_get_max_teams</code> &ndash; Maximum number of teams of teams region</a></li>
<li><a href="omp_005fget_005fmax_005fthreads.html"><code class="code">omp_get_max_threads</code> &ndash; Maximum number of threads of parallel region</a></li>
<li><a href="omp_005fget_005fnested.html"><code class="code">omp_get_nested</code> &ndash; Nested parallel regions</a></li>
<li><a href="omp_005fget_005fnum_005fdevices.html"><code class="code">omp_get_num_devices</code> &ndash; Number of target devices</a></li>
<li><a href="omp_005fget_005fnum_005fprocs.html"><code class="code">omp_get_num_procs</code> &ndash; Number of processors online</a></li>
<li><a href="omp_005fget_005fnum_005fteams.html"><code class="code">omp_get_num_teams</code> &ndash; Number of teams</a></li>
<li><a href="omp_005fget_005fnum_005fthreads.html"><code class="code">omp_get_num_threads</code> &ndash; Size of the active team</a></li>
<li><a href="omp_005fget_005fproc_005fbind.html"><code class="code">omp_get_proc_bind</code> &ndash; Whether threads may be moved between CPUs</a></li>
<li><a href="omp_005fget_005fschedule.html"><code class="code">omp_get_schedule</code> &ndash; Obtain the runtime scheduling method</a></li>
<li><a href="omp_005fget_005fsupported_005factive_005flevels.html"><code class="code">omp_get_supported_active_levels</code> &ndash; Maximum number of active regions supported</a></li>
<li><a href="omp_005fget_005fteam_005fnum.html"><code class="code">omp_get_team_num</code> &ndash; Get team number</a></li>
<li><a href="omp_005fget_005fteam_005fsize.html"><code class="code">omp_get_team_size</code> &ndash; Number of threads in a team</a></li>
<li><a href="omp_005fget_005fteams_005fthread_005flimit.html"><code class="code">omp_get_teams_thread_limit</code> &ndash; Maximum number of threads imposed by teams</a></li>
<li><a href="omp_005fget_005fthread_005flimit.html"><code class="code">omp_get_thread_limit</code> &ndash; Maximum number of threads</a></li>
<li><a href="omp_005fget_005fthread_005fnum.html"><code class="code">omp_get_thread_num</code> &ndash; Current thread ID</a></li>
<li><a href="omp_005fin_005fparallel.html"><code class="code">omp_in_parallel</code> &ndash; Whether a parallel region is active</a></li>
<li><a href="omp_005fin_005ffinal.html"><code class="code">omp_in_final</code> &ndash; Whether in final or included task region</a></li>
<li><a href="omp_005fis_005finitial_005fdevice.html"><code class="code">omp_is_initial_device</code> &ndash; Whether executing on the host device</a></li>
<li><a href="omp_005fset_005fdefault_005fdevice.html"><code class="code">omp_set_default_device</code> &ndash; Set the default device for target regions</a></li>
<li><a href="omp_005fset_005fdynamic.html"><code class="code">omp_set_dynamic</code> &ndash; Enable/disable dynamic teams</a></li>
<li><a href="omp_005fset_005fmax_005factive_005flevels.html"><code class="code">omp_set_max_active_levels</code> &ndash; Limits the number of active parallel regions</a></li>
<li><a href="omp_005fset_005fnested.html"><code class="code">omp_set_nested</code> &ndash; Enable/disable nested parallel regions</a></li>
<li><a href="omp_005fset_005fnum_005fteams.html"><code class="code">omp_set_num_teams</code> &ndash; Set upper teams limit for teams construct</a></li>
<li><a href="omp_005fset_005fnum_005fthreads.html"><code class="code">omp_set_num_threads</code> &ndash; Set upper team size limit</a></li>
<li><a href="omp_005fset_005fschedule.html"><code class="code">omp_set_schedule</code> &ndash; Set the runtime scheduling method</a></li>
<li><a href="omp_005fset_005fteams_005fthread_005flimit.html"><code class="code">omp_set_teams_thread_limit</code> &ndash; Set upper thread limit for teams construct</a></li>
<li><a href="omp_005finit_005flock.html"><code class="code">omp_init_lock</code> &ndash; Initialize simple lock</a></li>
<li><a href="omp_005fset_005flock.html"><code class="code">omp_set_lock</code> &ndash; Wait for and set simple lock</a></li>
<li><a href="omp_005ftest_005flock.html"><code class="code">omp_test_lock</code> &ndash; Test and set simple lock if available</a></li>
<li><a href="omp_005funset_005flock.html"><code class="code">omp_unset_lock</code> &ndash; Unset simple lock</a></li>
<li><a href="omp_005fdestroy_005flock.html"><code class="code">omp_destroy_lock</code> &ndash; Destroy simple lock</a></li>
<li><a href="omp_005finit_005fnest_005flock.html"><code class="code">omp_init_nest_lock</code> &ndash; Initialize nested lock</a></li>
<li><a href="omp_005fset_005fnest_005flock.html"><code class="code">omp_set_nest_lock</code> &ndash; Wait for and set nested lock</a></li>
<li><a href="omp_005ftest_005fnest_005flock.html"><code class="code">omp_test_nest_lock</code> &ndash; Test and set nested lock if available</a></li>
<li><a href="omp_005funset_005fnest_005flock.html"><code class="code">omp_unset_nest_lock</code> &ndash; Unset nested lock</a></li>
<li><a href="omp_005fdestroy_005fnest_005flock.html"><code class="code">omp_destroy_nest_lock</code> &ndash; Destroy nested lock</a></li>
<li><a href="omp_005fget_005fwtick.html"><code class="code">omp_get_wtick</code> &ndash; Get timer precision</a></li>
<li><a href="omp_005fget_005fwtime.html"><code class="code">omp_get_wtime</code> &ndash; Elapsed wall clock time</a></li>
<li><a href="omp_005ffulfill_005fevent.html"><code class="code">omp_fulfill_event</code> &ndash; Fulfill and destroy an OpenMP event</a></li>
</ul>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Environment-Variables.html">OpenMP Environment Variables</a>, Previous: <a href="OpenMP-Implementation-Status.html">OpenMP Implementation Status</a>, Up: <a href="index.html">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
